﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Twi.COMMON.Core
{
    /*
    * Copyright: ©2013 Tyingsoft 踏影软件开发工作室版权所有
    * Author: xuzhihong
    * Create Date:2013-04-26 
    * Description:简单条件查询     
    */
    public class SimpleCondition
    {
        public SimpleCondition()
        {
            COperator = CompareOperator.Equals;
            DataType = DbType.String;
        }
        /// <summary>
        /// 条件字段
        /// </summary>
        public string Field
        {
            get;
            set;
        }

        /// <summary>
        /// 条件字段值【碰见需要多个值的（如：In、NotIn、BetweenAnd），用逗号隔开。】
        /// </summary>
        public string Value
        {
            get;
            set;
        }

        /// <summary>
        ///  条件比较操作符枚举
        /// </summary>
        public CompareOperator COperator
        {
            get;
            set;
        }

        /// <summary>
        /// 条件数据类型
        /// </summary>
        /// <remarks>
        /// DataType.Date=5
        /// DataType.DateTime = 6
        /// DataType.Int32 = 11
        /// DataType.String = 16
        /// DataType.Time = 17  
        /// DataType.DateTime2 =26
        /// </remarks>
        public DbType DataType
        {
            get;
            set;
        }
    }
}
